<template>
	<view class="container">
		<u-input v-model="value" :type="type" :border="border" placeholder="请输入所选城市的拼音"/>
		<u-button class="btn" type="primary" @click="search">搜索</u-button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value: '',
				type: 'text',
				border: true
			};
		},
		methods:{
			search(){
				uni.setStorageSync('city', this.value);
				uni.navigateTo({
					url: '/pages/index/index'
				});
			}
		}
	}
</script>

<style lang="scss">
	.container {
		min-height: calc(100vh - 44px);
		background-image: url('/static/beijing.jpg');
		background-size: 100% 100%;
		padding: 0 40rpx;
		display: flex;
		flex-direction: column;
		justify-content: center;
		// align-items: center;
	}
	::v-deep .u-input--radius[data-v-113bc24f], .u-input--square[data-v-113bc24f]{
		border: 1px solid #000;
		flex:none
	}
	::v-deep.uni-input-placeholder{
		color:#000
	}
	.btn{
		margin-top:20rpx
	}
</style>